const USER_INFO = "user_info"
const TOKEN = "token"
const REFRESH_TOKEN = "refresh_token"
const LOCAL_INFO = "local_info"
const ROLE = "role"
const HOUSE_DES = "house_des"
export function setStore(key,val){
	uni.setStorageSync(key,val)
}
export function getStore(key){
	return uni.getStorageSync(key)
}
export default {
	//设置token
	set_token(val){
		setStore(TOKEN,val)
	},
	//获取token
	get_token(){
		return getStore(TOKEN)
	},
	//设置刷新token
	set_refresh_token(val){
		setStore(REFRESH_TOKEN,val)
	},
	//获取刷新token
	get_refresh_token(){
		return getStore(REFRESH_TOKEN)
	},
	//设置user_info
	set_user_info(val){
		setStore(USER_INFO,val)
	},
	//获取user_info
	get_user_info(){
		return getStore(USER_INFO)
	},
	//设置经纬度信息
	set_local_info(value){
		setStore( LOCAL_INFO,value)
	},
	//获取经纬度信息
	get_local_info(){
		return getStore(LOCAL_INFO)
	},
	//设置角色
	set_user_role(value){
		setStore(ROLE,value)
	},
	get_user_role(){
		return getStore(ROLE)
	},
	//设置房屋介绍
	set_house_des(val){
		setStore(HOUSE_DES,val)
	},
	//获取房屋介绍
	get_house_des(){
		return getStore(HOUSE_DES)
	}
}